#include<iostream>
using namespace std;

class Singleton
{
public:
	static Singleton* Instance()
	{
		if (_instance == 0)
		{
			_instance = new Singleton();
		}
		return _instance;
	}

protected:
	Singleton()
	{
		cout<<"Singleton...."<<endl;
	}
private:
	static Singleton* _instance;
};
Singleton* Singleton::_instance = 0;

int main(int argc,char* argv[])
{
	Singleton* sgn = Singleton::Instance();
	return 0;
}